cmake_minimum_required(VERSION 2.8)

project(test_json)

file(GLOB PROGSRCS *.cpp)
foreach (PROG_SRC ${PROGSRCS})
    get_filename_component(PROG ${PROG_SRC} NAME_WLE)
    message("${PROG} ${PROG_SRC}")
    add_executable(${PROG} ${PROG_SRC})
    set(lib_DIR /usr/lib/x84_64-linux-gnu)
    find_package(${lib_DIR})
    target_link_libraries(${PROG} libjsoncpp.a)
endforeach ()